# Moths - an environment for mathy calculations
# Copyright (C) 2006 Mike Sutjipto
# Licensed under the GPL

module Moths
  
  # Simply represents a parenthetical enclosure - its children
  # are the actual contents.  It's main purpose is to be able to assign
  # a precedence to parentheticals (in the PEMDAS sense)
  #
  class Parentheses < Expression
    @content

    def initialize(content)
      @content = content
      @precedence = 6
    end

    def eval(env)
      return @content.eval(env)
    end

    def to_s
      return @content.to_s
    end
  end
  
end
